#include "stdafx.h"
#include "CppUnitTest.h"

#include "../Geometry/Vector3d.h"
//#include "../Geometry/Vector3d.cpp"
//
#include "../Geometry/Line3d.h"
#include "../Geometry/Line3d.cpp"
//
#include "../Geometry/Point3d.h"
#include "../Geometry/Point3d.cpp"


using Geometry::Vector3d;
using Geometry::Line3d;
using Geometry::Point3d;

using namespace Microsoft::VisualStudio::CppUnitTestFramework;

namespace GeometryTests
  {
  TEST_CLASS(UnitTestVector3d)
    {
    public:
      TEST_METHOD(ShouldCheckPointContaining)
        {
        Line3d l(Point3d(), Vector3d(1, 1, 1));
        Assert::IsTrue(l.ContainsPoint(Point3d(1,1,1)));
        Assert::IsFalse(l.ContainsPoint(Point3d(1, 0, 1)));
        }

      TEST_METHOD(ShouldCompareCorrectly)
        {
        Line3d l1(Point3d(1, 1, 1), Vector3d(1, 1, 1));
        Line3d l2(Point3d(0, 0, 0), Vector3d(3, 3, 3));
        Line3d l3(Point3d(0, 0, 0), Vector3d(1, 0, 1));

        Assert::IsTrue(l1 == l2);
        Assert::IsFalse(l1 == l3);
        }

    };
  }